<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <title>Document</title>
</head>

<body>
    <script>
        var a = {
            key1: 1,
            key2: 2
        }
        console.log(Object.keys(a))
        delete a.key1
        console.log(Object.keys(a))
        a.foo = 'nihao'
        for (obj in a) {
            console.log(obj)
        }
        // debugger
    </script>
</body>

</html>